home *** CD-ROM | disk | FTP | other *** search
ASP.NET Web Form | 2002-03-17 | 2.6 KB | 73 lines |
- <%@ Page Language="vb" AutoEventWireup="false" Codebehind="RepeaterForm.aspx.vb" Inherits="DataBinding.RepeaterForm" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <HEAD>
- <title>RepeaterForm</title>
- <meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
- <meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
- <meta content="JavaScript" name="vs_defaultClientScript">
- <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
- </HEAD>
- <body>
- <form id="Form1" method="post" runat="server">
- <H1><SPAN style="FONT-SIZE: large; FONT-FAMILY: 'Arial Black'"><FONT face="Times New Roman">Repeater
- Control Demo</FONT></SPAN></H1>
- <P><SPAN style="FONT-SIZE: large; FONT-FAMILY: 'Arial Black'"><FONT face="Times New Roman" size="3">This
- page demonstrates several features of the Repeater control, including the
- ability to contain a button and react to clicks on it, and the degree of
- customization you can achieve by trapping the ItemCreated and ItemDataBound
- events.</FONT></SPAN></P>
- <P> </P>
- <P>
- <asp:repeater id="Repeater1" runat="server">
- <HeaderTemplate>
- <b>Bulleted list of publishers: </b>
- <br />
- <hr />
- </HeaderTemplate>
- <ItemTemplate>
- <li>
- <%# Container.DataItem("Name") %>
- </li>
- </ItemTemplate>
- <AlternatingItemTemplate>
- <span style="BACKGROUND-COLOR: #ffff99">
- <li>
- <%# DataBinder.Eval(Container, "DataItem(""Name"")") %>
- </li>
- </span>
- </AlternatingItemTemplate>
- <SeparatorTemplate>
- <br />
- </SeparatorTemplate>
- <FooterTemplate>
- <hr />
- </FooterTemplate>
- </asp:repeater></P>
- <P>
- <asp:repeater id="Repeater2" runat="server">
- <HeaderTemplate>
- <b>List of publishers with a More Info button: </b>
- <br />
- <hr />
- </HeaderTemplate>
- <ItemTemplate>
- <asp:Button runat=server Text='more info' CommandName='moreinfo' CommandArgument='<%# Container.DataItem("PubId") %>' ID="Button1"/>
- <%# Container.DataItem("Name") %>
- (
- <asp:HyperLink Runat=server NavigateUrl='ShowTitles.aspx?pubid=<%# Container.DataItem("PubId") %>'>Show Titles</asp:HyperLink>)
- </ItemTemplate>
- <SeparatorTemplate>
- <br />
- </SeparatorTemplate>
- <FooterTemplate>
- <hr />
- </FooterTemplate>
- </asp:repeater></P>
- <P>
- <asp:Label id="Label1" runat="server">Label</asp:Label>
- </form>
- </P>
- </body>
- </HTML>
-